<table id="listeSequences">    
    <th>Date(s)</th>
    <?php
        $check = 0;
        foreach ( $this->threads as $myThread )
        {
        ?>
            <th>
                <a class="lienAjax" href="sequences?threadId=<?php echo $myThread['id'];?>&selectedDate=<?php echo $this->selectedDate;?>&selectedType=<?php echo $this->selectedType; ?>" target="content"><?php echo $myThread['name'];?></a>
            </th>
        <?php
        }
        
        $i=0;
        foreach ( $this->sequencesParDate as $dates )
        {
        ?>
            <tr <?php if ( $i % 2 == 0 ) echo "class=\"pair\"";else echo "class=\"impair\""?> >
                <td class="alignmiddle">
                    <b>
                        <a class="lienAjax" href="sequences?threadId=<?php echo $this->selectedThread;?>&selectedDate=<?php echo $dates['date'];?>&selectedType=<?php echo $this->selectedType; ?>" target="content"><?php echo $dates['date'];?></a>
                    </b>
                </td>
            <?php
            $i++;
            foreach ( $dates['data'] as $myThread )
            {
            ?>
                <td>
                    <table>
                        <tr>
                <?php
                $col = 0;
                
                foreach ( $myThread['data'] as $mySequence )
                {
                    if ( ($col > 0) && ($col % $this->cols == 0) )
                    {
                    ?>
                        </tr>
                        <tr>
                    <?
                    }   
                    ?>
                            <td>
                                <table class="tablette">
                                    <tr><th><?php echo $mySequence['heure'];?></th>
                                        <th><input type="checkbox" name="checkbox<?php echo $check;?>" value="<?php echo $mySequence['video'];?>"/></th>
                                    </tr>                                    
                                    <tr>
                                        <td colspan="2" class="align-center">
                                            <a class="lienAjax" href="sequences/consult?threadId=<?php echo $myThread['id'];?>&selectedThread=<?php echo $this->selectedThread;?>&selectedType=<?php echo $this->selectedType;?>&selectedDate=<?php echo $this->selectedDate;?>&file=<?php echo $mySequence['video'];?>" target="visu">
                                            <img class="vignette" src="<?php echo $mySequence['img'];?>" width="60" height="50" />
                                            </a>
                                        </td>                                        
                                    </tr>
                                    <tr><td>
                                            <?php echo $mySequence['size'];?>(Ko)
                                        </td>
                                        <?php if ( $this->userAllowed ) { ?>
                                            <td>
                                                <a class="supprimAjax" title="Supprimer" href="/sequences/delete?selectedThread=<?php echo $this->selectedThread;?>&threadId=<?php echo $myThread['id'];?>&selectedType=<?php echo $this->selectedType; ?>&selectedDate=<?php echo $this->selectedDate;?>&file=<?php echo $mySequence['video'];?>" target="content">
                                                    <img src="imgweb/film_delete.png" />
                                                </a>
                                            </td>
                                        <?php } ?>
                                    </tr>
                                </table>
                            </td>
                    <?php
                    $check++;
                    $col++;                                             
                }
                ?>
                </tr></table></td>                
            <?php
            }
        }
        ?>
</table>
<input type="hidden" name="fileCount" value="<?php echo $check?>" />